<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./js/jquery.js"></script>
    <style>
      .box {
        width: 500px;
        height: 300px;
        background-color: rgb(230, 72, 190);
        margin-top: 50px;
        display: none;
      }
    </style>
  </head>
  <body>
    <button>下拉滑动</button>
    <button>上拉滑动</button>
    <button>切换滑动</button>
    <div class="box"></div>
    <script>
      $(function () {
        $("button")
          .eq(0)
          .click(function () {
            $(".box").slideDown();
          });
        $("button")
          .eq(1)
          .click(function () {
            $(".box").slideUp();
          });
        $("button")
          .eq(2)
          .click(function () {
            $(".box").slideToggle()
          });
      });
    </script>
  </body>
</html>
